home *** CD-ROM | disk | FTP | other *** search
- Path: host1.einstein.com.ar!news
- From: jkohen@einstein.com.ar (Javier Kohen)
- Newsgroups: comp.lang.c
- Subject: Help me with a bug programming the mouse
- Date: Sat, 06 Apr 1996 00:08:55 GMT
- Organization: Red Einstein
- Message-ID: <4k4i5f$nn7@host1.einstein.com.ar>
- Reply-To: jkohen@einstein.com.ar
- NNTP-Posting-Host: ppp-09.einstein.com.ar
- X-Newsreader: Forte Free Agent 1.0.82
-
- I have a problem with the mouse in 80x86 assembler.
-
- I am working on 486/66, Microsoft Mouse Driver 9.0 and a Microsoft
- InPort
- Mouse connected on a PS/2 mouse port. The code below doesn't work
- right (it
- is a fragment, the original compiles right). When I press the button
- once, the
- program ends, because the effect of the first time I pressed the
- button remains
- in the second loop. I try puting a delay before the second
- interruption call,
- but it doesn't affect the problem, even with a 200 miliseconds delay
- (too much
- to wait for in a program). Where the hell is the bug? Should I use
- another
- mouse function?.
-
- Sorry but my english isn't very good.
-
- Here is the problematic code:
-
- ;;;;; CUT HERE
-
- mov ax, 03 ; call mouse function number 3.
- Loop1:
-
- int 33 ; get position and button status. (First call)
- test bx, 07 ; test for any button press.
- jz Loop1 ; if no button is pressed loop again.
-
- Loop2:
- int 33 ; get position and button status. (Second call)
- test bx, 07 ; test for any button press.
- jz Loop2 ; if no button is pressed loop again.
-
- ;;;;; CUT HERE
-
- Thanks,
- Javier Kohen
-
- Please E-mailme a fix to jkohen@einstein.com.ar
-
-
-